package com.aihwcm.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Aihrolerights entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "aihrolerights", catalog = "aihwcmdb")
public class Aihrolerights implements java.io.Serializable {

	// Fields

	private Integer rolerightid;
	private Aihrights aihrights;
	private Aihroles aihroles;

	// Constructors

	/** default constructor */
	public Aihrolerights() {
	}

	/** full constructor */
	public Aihrolerights(Aihrights aihrights, Aihroles aihroles) {
		this.aihrights = aihrights;
		this.aihroles = aihroles;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "rolerightid", unique = true, nullable = false)
	public Integer getRolerightid() {
		return this.rolerightid;
	}

	public void setRolerightid(Integer rolerightid) {
		this.rolerightid = rolerightid;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "rightid")
	public Aihrights getAihrights() {
		return this.aihrights;
	}

	public void setAihrights(Aihrights aihrights) {
		this.aihrights = aihrights;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "roleid")
	public Aihroles getAihroles() {
		return this.aihroles;
	}

	public void setAihroles(Aihroles aihroles) {
		this.aihroles = aihroles;
	}

}